import http from "@/utils/request";

export default {
    /**
     * 查询列表
     * @param  params
     * @returns
     */
    async getDataList(year,month) {
        return await http.get("/api/getDays/getday", { month,year });
    },
    /**
    * 添加
    * @returns
    */
    async addData(params) {
        return await http.post("/api/ydscsjtjb/add", params)
    },
    /**
    * 修改
    * @returns
    */
    async updateData(params) {
        return await http.put("/api/ydscsjtjb/update", params)
    },
    //上传文件
    async importExcel(myfile) {
        // console.log(29999999);
        console.log(myfile.get("myfile"));

        return await http.upload("/api/fileAbout/fileUpload", { myfile })
    },

    //导入文件
    async batchImportExcel(filePath) {
        // console.log(typeof(filePath));
        // console.log(filePath.get("filePath"));
        return await http.upload("/api/ydscsjtjb/batchInput", { filePath })
    },

    /**
    * 下载模板
    */
    async download(params) {
        // console.log(1);
        return await http.get("/api/ydscsjtjb/downLoadExcel", params)
    },
    async delete(params) {
        return await http.delete("/api/ydscsjtjb/delete", params)
    },
}
